myonload=function(myym,url){
	let xml;
	let status=0;
	if(myym=="xg")
		status=1;
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){
				let t=JSON.parse(xml.responseText);
				for(let i=0;i<t.data.length;i++){
				setmessage(t.data[i].sID,t.data[i].sName,
					t.data[i].sRecorder,t.data[i].sRecordDate,myym,t.data[i].sStatus)
				}
		}
	}
	xml.open("post",url,true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send('sStatus='+status);
}
setmessage=function(sID,sName,sRecorder,sTime,myym,stu){
	let maxbox=document.getElementsByClassName('mymainbox')[0];	
	let box1=document.createElement('div');
	box1.className='myemployees';
	let box2=document.createElement('div');
	let box3=document.createElement('div');
	let box4=document.createElement('div');
	let box5=document.createElement('div');
	let box9=document.createElement('div');
	let box10=document.createElement('div');
	let a=document.createElement('a');
	let b=document.createElement('a');
	a.className="nav-link pl-3";
	b.className="nav-link pl-3";
	if(myym=="fh"){
	a.href="momeyfhshow.html?sID="+sID;
	a.innerText="复核";
	}
	else 
	{
		a.innerText="修改";
		a.href="showmemoy.html?sID="+sID;
		if(stu!=2)
		b.innerText="删除";
		else
		b.innerText="恢复";
	}
	let lable=document.createElement("label");
	lable.className="fuhe";
	let lable1=document.createElement("label");
	lable1.className="fuhe";
	lable.appendChild(a);
	lable1.appendChild(b);
	box2.className='reviewbox1';
	box3.className='reviewbox2';
	box4.className='reviewbox2';
	box5.className='reviewbox2';
	box9.className='reviewbox2';
	box10.className='reviewbox2';
	box9.appendChild(lable);
	box10.appendChild(lable1);
	box2.innerText=sID;
	box3.innerText=sName;
	box4.innerText=sRecorder;
	box5.innerText=sTime;
	box1.appendChild(box2);
	box1.appendChild(box3);
	box1.appendChild(box4);
	box1.appendChild(box5);
	box1.appendChild(box9);
	box1.appendChild(box10);
	maxbox.appendChild(box1);
	b.onclick=function(){
		let xml;
		let x;
		if(b.innerText=="删除")
		{
			x=2;
			a.href="";
		}
		else
		{
			x=0;
		a.href="momeyfhshow.html?sID="+sID;
		}
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){	
				let x=JSON.parse(xml.responseText);
				if(x.status==200){
					alert("成功");
					box1.remove();
				}
		}
	}
	xml.open("post","/salary/delete",true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send('sID='+sID);
	}
}
